package com.mycompany.myapp.factory;

import com.mycompany.myapp.dao.*;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.BeansException;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;

public class DaoFactory
{
	/**
	 * Method 'createJoueurDao'
	 * 
	 * @return JoueurDao
	 */
	public static JoueurDao createJoueurDao()
	{
		BeanFactory bf = new XmlBeanFactory( new ClassPathResource("dao-beans.xml") );
		return (JoueurDao) bf.getBean( "JoueurDao" );
	}

	/**
	 * Method 'createMonstreDao'
	 * 
	 * @return MonstreDao
	 */
	public static MonstreDao createMonstreDao()
	{
		BeanFactory bf = new XmlBeanFactory( new ClassPathResource("dao-beans.xml") );
		return (MonstreDao) bf.getBean( "MonstreDao" );
	}

}
